package com.minidb.sql_compiler;

import com.minidb.engine.CatalogManager;
import java.util.List;

public class Catalog {
    private CatalogManager catalogManager;

    public Catalog(CatalogManager catalogManager) {
        this.catalogManager = catalogManager;
    }

    // Check if a table exists in the catalog
    public boolean tableExists(String tableName) {
        return catalogManager.tableExists(tableName);
    }

    // Get the list of column names for a given table
    public List<String> getColumns(String tableName) {
        return catalogManager.getColumns(tableName);
    }

    // Get the list of column types for a given table
    public List<String> getColumnTypes(String tableName) {
        return catalogManager.getColumnTypes(tableName);
    }

    // Get the data type of a specific column in a table
    public String getColumnType(String tableName, String columnName) {
        return catalogManager.getColumnType(tableName, columnName);
    }
}
